Hey... name1 A name2 B name3 C Module, in which shall be replaced: name1=D name2=E name3=F So, I just want to replace name1 and name3. Every "name1=*don't care*" shall be replaced by "name1=A" and so on... Has anysome a idea or some code how to do this? Thanks a lot in advance... Mr.Ferrari - Tue Oct 05 09:27:57 EDT 2010 |
Re: Multiple Replace All
Huh?
void ReplaceValue(Module in_mod, string in_NameAttr, in_ValueIgnore, in_ValueNew)
{ // Replace all object attribute values in the module that are null or to be Ignored
// with the new Value
Object obj
string ValueOld
for obj in entire in_mod) do
{ if (isDeleted(obj)) continue
ValueOld = probeAttr_(obj, in_NameAttr)
if (null ValueOld or ValueOld == in_ValueIgnore)
{ noError()
obj.NameAttr = in_ValueNew
lastError()
}
}
} // end ReplaceValue()
|